home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / comm / tcp / hserv.lha / hserv / cgi-bin / fileServ.rexx < prev    next >
OS/2 REXX Batch file  |  1999-05-24  |  638b  |  37 lines

  1. /* fileServ.rexx */
  2.  
  3. parse arg "file="file
  4. file=decode(file)
  5.  
  6. eol='A'x
  7. say "Content-Type: text/html"eol
  8.  
  9. if exists("/htdocs/archive/"file) then do
  10.     say '
  11. <HTML>
  12. <HEAD><TITLE>'file'</TITLE></HEAD>
  13. <SCRIPT LANGUAGE="JavaScript">
  14. window.location.href = "/archive/'file'";
  15. </SCRIPT>
  16. </HEAD>
  17. <BODY>
  18. Downloading' file'<br>
  19. <NOSCRIPT>
  20. You need a JavaScript enabled browser to use this cgi.
  21. </NOSCRIPT>
  22. <br><A HREF="/form.html"><back></A>
  23. </BODY>
  24. </HTML>'
  25. end
  26. else do
  27.     say '
  28. <HTML>
  29. <HEAD>
  30. <TITLE>File Server</TITLE>
  31. </HEAD>
  32. <BODY>
  33. File:' file 'does not exist on this server<br><br><A HREF="/form.html"><back></A>
  34. </BODY>
  35. </HTML>'
  36. end
  37.